package cn.wolfcode.repsitory;

import cn.wolfcode.domain.Strategy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: 目的地持久化接口
 * @Author: 伍家钰
 * @Date: 2020/8/7 16:25
 * @Version: 1.0
 */
@Repository
public interface StrategyRepsitory extends MongoRepository<Strategy, String> {
    /**
     * 根据攻略分类id查询攻略对象的集合
     *
     * @param catalogId
     * @return
     */
    List<Strategy> findByCatalogId(String catalogId);

    /**
     * 通过id查询点击量前三
     * @param destId
     * @param pageable
     * @return
     */
    List<Strategy> findByDestId(String destId, Pageable pageable);
}
